<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>asynPortClient</title>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
</head>
<body>
  <div style="text-align: center">
    <h1>
      asynPortClient</h1>
    <h1>
      C++ Base Class for Asyn Port Clients</h1>
    <h2>
      January 26, 2019</h2>
    <h2>
      Mark Rivers</h2>
    <h2>
      University of Chicago</h2>
  </div>
  <p>
    asynPortClient is a set of C++ classes that are designed to simplify the task of
    writing a client that directly communicates with an asyn port driver, without running
    an EPICS IOC. They handle the details of connecting to the driver, finding the required
    interfaces, etc. They only use the synchronous interfaces, so all calls are blocking.
    If clients need asynchronous operation then they can use the normal C interface
    with pasynManager->queueRequest.</p>
  <p>
    asynPortClient provides a base class, asynParamClient, from which interface-specific
    class are derived. It also provides a class for each of the standard asyn interfaces,
    (asynInt32Client, asynFloat64Client, asynCommonClient, asynEnumClient, etc.).</p>
  <p>
    The asynPortClient class connects to a specific asynPortDriver object.  It creates
    an asynParamClient derived class for each of the parameters in that driver.  It uses the
    std::map class to map between the parameter name key and the asynParamClient object
    for that parameter.  It also defines generic write() and read() methods that take
    a paramName argument and the value to be written or pointer to read into.  The data
    type of the value or pointer must match the parameter type or a run-time exception
    will be thrown.</p>
  <p>
    The detailed documentation for asynPortClient is in these files (generated by doxygen):</p>
  <ul>
  <li><a href="asynDoxygenHTML/classasyn_param_client.html">asynParamClient class reference</a></li>
  <li><a href="asynDoxygenHTML/classasyn_port_client.html">asynPortClient class reference</a></li>
    <li><a href="asynDoxygenHTML/asyn_port_client_8h.html">asynPortClient.h file reference</a></li>
  </ul>
  <p>
    The example driver in asyn (testAsynPortClient) is a simple example of how to use
    this class.</p>
  <p>
    Another example can be found in ADSimDetector/iocs/simDetectorNoIOC found in the <a href="https://cars.uchicago.edu/software/epics/areaDetector.html">
      areaDetector</a> module.
  </p>
  <h2>
    Example client - testAsynPortClient</h2>
  <p>
    An example client using the asynPortClientclass is provided in the testAsynPortClientApp
    application in asyn. This tests running C++ applications that communicate with asyn
    port drivers without running an IOC. This currently contains a single test application,
    testAsynIPPortClient.cpp. This program creates an asynIPPort driver, and uses the
    command line arguments to set the hostInfo string, a single command string to send
    to the server, and optionally the input and output EOS. It then prints out the response
    from the server. There are 3 example shell scipts that show how to use testAsynIPPortClient
    to communicate with a Web server, XPS motor controller, and a telnet host respectively.</p>
</body>
</html>
